From 68249ab9bcbde468a1000dc93ef4438816c63fab Mon Sep 17 00:00:00 2001 From: Drew Parsons Date: Mon, 25 May 2026 21:08:49 +0200 Subject: [PATCH] add debian patch numpy_drop_in1d_MR12693.patch applies upstream MR#12693 to remove numpy.in1d, no longer provided by numpy 1.24 (use numpy.isin instead). Closes: #1137015 --- debian/changelog | 8 +++++ debian/patches/numpy_drop_in1d_MR12693.patch | 38 ++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 47 insertions(+) create mode 100644 debian/patches/numpy_drop_in1d_MR12693.patch diff --git a/debian/changelog b/debian/changelog index 0f40b35c7..50280fc01 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +vtk9 (9.5.2+dfsg4-5) UNRELEASED; urgency=medium + + * debian patch numpy_drop_in1d_MR12693.patch applies upstream + MR#12693 to remove numpy.in1d, no longer provided by numpy 1.24 + (use numpy.isin instead). Closes: #1137015 + + -- Drew Parsons Mon, 25 May 2026 21:06:49 +0200 + vtk9 (9.5.2+dfsg4-4) unstable; urgency=medium * Team upload. diff --git a/debian/patches/numpy_drop_in1d_MR12693.patch b/debian/patches/numpy_drop_in1d_MR12693.patch new file mode 100644 index 000000000..d3423ba12 --- /dev/null +++ b/debian/patches/numpy_drop_in1d_MR12693.patch @@ -0,0 +1,38 @@ +From 0f9b0ce9fad6bc42a1a69076a32b08ad161adc16 Mon Sep 17 00:00:00 2001 +From: Guillaume Gisbert +Date: Mon, 8 Dec 2025 09:06:41 +0100 +Subject: [PATCH 1/2] Remove deleted numpy function in1d + +--- + Wrapping/Python/vtkmodules/numpy_interface/algorithms.py | 3 --- + Wrapping/Python/vtkmodules/numpy_interface/numpy_algorithms.py | 3 --- + 2 files changed, 6 deletions(-) + +Index: vtk9/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py +=================================================================== +--- vtk9.orig/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py 2026-05-25 21:03:24.243777846 +0200 ++++ vtk9/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py 2026-05-25 21:05:08.618648422 +0200 +@@ -981,8 +981,8 @@ + ugrid.GetPointData().AddArray(da) + return ugrid + +-in1d = _make_ufunc(numpy.in1d) +-in1d.__doc__ = "Test whether each element of a 1-D array is also present in a second array." ++isin = _make_ufunc(numpy.isin) ++isin.__doc__ = "Test whether each element of a 1-D array is also present in a second array." + + isnan = _make_ufunc(numpy.isnan) + isnan.__doc__ = "Returns a bool array, true if values is nan." +Index: vtk9/Common/Core/Testing/Python/TestNumpyInterface.py +=================================================================== +--- vtk9.orig/Common/Core/Testing/Python/TestNumpyInterface.py 2026-05-25 21:03:24.243777846 +0200 ++++ vtk9/Common/Core/Testing/Python/TestNumpyInterface.py 2026-05-25 21:04:07.865986076 +0200 +@@ -119,7 +119,7 @@ + compare(algs.cos(randomVec) - numpy.cos(npa), 1E-7) + assert algs.cos(randomVec).DataSet is randomVec.DataSet + +-assert algs.in1d(elev, [0,1]) == [item in [0, 1] for item in elev] ++assert algs.isin(elev, [0,1]) == [item in [0, 1] for item in elev] + + # Various numerical ops implemented in VTK + g = algs.gradient(elev) diff --git a/debian/patches/series b/debian/patches/series index a1f79c59e..cba98ffd1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,3 +14,4 @@ findEXPAT_version_fix_MR12826.patch matplotlib_nullptr_s390x.patch gdal-3.13.patch +numpy_drop_in1d_MR12693.patch -- 2.30.2